package cool.tianyou.blue.bird.common.model.po;

import java.util.List;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author Liutianyou
 * @date 2021/7/31 12:09 下午
 */
@Data
@NoArgsConstructor
public class LoginUser {

  private Integer userId;
  private String deviceName;
  private Integer deviceId;
  private List<Device> deviceList;
  private String alias;
  private String token;

  public LoginUser(User user, Device device, String token) {
    this.userId = user.getId();
    this.deviceName = device.getDeviceName();
    this.deviceId = device.getId();
    this.alias = device.getAlias();
    this.token = token;
  }
}
